首页
<template>
    <div class="main">
        <el-card class="box-card">
         <div class="infinite-list" v-infinite-scroll="load">
         <el-row> 
             <el-col :span="7">在线用户</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.user}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">在线设备</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.device}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">CPU利用率</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.cpu_ratio}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">接收数据</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.receive}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">发送数据</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.send}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">系统类型</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.sys_type}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">系统版本</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.sys_version}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">内存大小</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.memory}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">空余内存</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.free_memory}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">11主频</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.frequency}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">CPU型号</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.cpu_model}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">外部存储</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.storage}}</el-col>
         </el-row><el-row> 
             <el-col :span="7">内存利用率</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.memory_ratio}}</el-col>
         </el-row>
         <el-row> 
             <el-col :span="7">设备序列号</el-col>
             <el-col :span="3">:</el-col>
             <el-col :span="7">{{system_info.serial}}</el-col>
         </el-row>
         </div>
        </el-card>
</div>
</template>

<script>
import axios from '../plugins/axios'  //在哪里用就在哪里引入
// require('@/mock/main.js')
export default {
    data(){
        return{
            system_info:{},
        }
    },
    methods: {
      load () {
        this.count = 2;
      }
    },
     created:function(){
        axios.get('/action/system_arg')
        .then(response=>{
            this.system_info=response.data;
            //console.log(this.system_info);
        })
        .catch(error=>{
           console.log(error);
           alert('网络错误');
        })
},
}
</script>

<style scoped>
.el-card{
    position:absolute;
    left: 14.5%;
    width: 82%;
    top:14.97%;
    padding: 3px;
    margin: 0px;
    height: 81%;
    font-size: 20px;
}
</style>
